/*

C. A Cookie for You
time limit per test1 second
memory limit per test256 megabytes
inputstandard input
outputstandard output
Anna is a girl so brave that she is loved by everyone in the city and citizens love her cookies. She is planning to hold a party with cookies. Now she has a vanilla cookies and b chocolate cookies for the party.

She invited n guests of the first 
type and m guests of the second type to the party. They will come to the party in some order. After coming to the party, each guest will choose the type of cookie (vanilla or chocolate) to eat. There is a difference in the way how they choose that type:
*/
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long
int main(){
	int t;
	scanf("%d",&t);
	while(t--)
	{
		long long a,b,n,m;
		scanf("%lld %lld %lld %lld",&a,&b,&n,&m);
		if(min(a,b)>=m&&a+b>=n+m) puts("YES");
		else puts("NO");
	}
}

